<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>运算符优先级的使用</title>
</head>

<body>
<script type="text/javascript">
var balance = 10;//定义手机话费余额变量
var call = 0.2;//定义通话资费变量
var traffic = 0.5;//定义流量资费变量
var minutes = (balance-traffic*10)/call;//计算余额可通话分钟数
document.write("手机话费余额还可以通话"+minutes+"分钟");//输出字符串
</script>
</body>
</html>
